<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>A.2.&nbsp;Changes from XMLUnit 1.1 to 1.2</title><meta content="DocBook XSL Stylesheets V1.69.1" name="generator"><link rel="start" href="index.html" title="XMLUnit Java User's Guide
    
  "><link rel="up" href="apa.html" title="A.&nbsp;Changes"><link rel="prev" href="apa.html" title="A.&nbsp;Changes"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">A.2.&nbsp;Changes from XMLUnit 1.1 to 1.2</th></tr><tr><td align="left" width="20%"><a accesskey="p" href="apa.html">Prev</a>&nbsp;</td><th align="center" width="60%">A.&nbsp;Changes</th><td align="right" width="20%">&nbsp;</td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="Changes 1.2"></a>A.2.&nbsp;Changes from XMLUnit 1.1 to 1.2</h3></div></div><div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="Breaking Changes 1.2"></a>A.2.1.&nbsp;Breaking Changes</h4></div></div><div></div></div><div class="itemizedlist"><ul type="disc"><li>
            If XMLUnit detects that it cannot match a certain node
            (i.e. it encounters
            a <code class="literal">CHILD_NODE_NOT_FOUND</code>
            kind of difference) the XPath for the "missing" node will
            be null.  It used to be some random XPath of a different node.
          </li><li><code class="literal">XMLUnit.setIgnoreDiffBetweenTextAndCDATA</code>
            now also
            sets <code class="literal">DocumentBuilderFactory.setCoalescing</code>.
            This has been done so that whitespace differences can be
            resolved according to the corresponding flags even in the
            presence of CDATA
            sections.  <a href="" target="_top">Issue
            1903923</a>.</li><li>
            Two protected methods
            in <code class="literal">SimpleXPathEngine</code> (which you
            shouldn't extend anyway) have added XpathException to
            their throws list.
          </li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="New Features 1.2"></a>A.2.2.&nbsp;New Features</h4></div></div><div></div></div><div class="itemizedlist"><ul type="disc"><li>The <code class="literal">SAXParserFactory</code> used
          by <code class="literal">Validator</code> can now be configured
          completely.  <a href="" target="_top">Issue
          1903928</a>.</li><li>A new
          class <code class="literal">org.custommonkey.xmlunit.jaxp13.Validator</code>
          can be used to validate schema definitions and schema
          instances using the <code class="literal">javax.xml.validation</code>
          package of JAXP 1.3.  Depending on your JAXP implementation
          this may allow you to validate documents against schema
          definitions written in RELAX NG or other schema languages in
          addition to W3C XML Schema.  See
          <a href="ar01s04.html#JAXP 1.3 Validation" title="4.4.&nbsp;JAXP 1.3 Validation">Section&nbsp;4.4, &ldquo;JAXP 1.3 Validation&rdquo;</a> for details.</li><li><code class="literal">DifferenceListener</code> can now
          "upgrade" recoverable differences to non-recoverable by
          returning <code class="literal">RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT</code>
          in the <code class="literal">differenceFound</code>
          method.  <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1854284&group_id=23187&atid=377771" target="_top">Issue
          1854284</a>.</li><li>A new callback
          interface <code class="literal">MatchTracker</code> is now notified on
          successful matches of Nodes.  For more details see
          <a href="ar01s03.html#MatchTracker" title="3.6.&nbsp;MatchTracker">Section&nbsp;3.6, &ldquo;<code class="literal">MatchTracker</code>&rdquo;</a>.  <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1860491&group_id=23187&atid=377771" target="_top">Issue
          1860491</a>.</li><li>It is now possible to have more control over
          whether the parser expand entity references or not by
          using <code class="literal">XMLUnit.setExpandEntityReferences</code>,
          see <a href="ar01s03.html#Entity Reference Expansion" title="3.8.5.&nbsp;Entity Reference Expansion">Section&nbsp;3.8.5, &ldquo;Entity Reference Expansion&rdquo;</a>.  <a href="" target="_top">Issue
          1877458</a>.</li><li>New examples have been added:
            <div class="itemizedlist"><ul type="circle"><li><code class="literal">RecursiveElementNameAndTextQualifier</code>
                - a more flexible <code class="literal">ElementQualifier</code>
                that fills the same need as
                <code class="literal">MultiLevelElementNameAndTextQualifier</code>
                 See
                 <a href="ar01s03.html#RecursiveElementNameAndTextQualifier" title="3.4.4.&nbsp;org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier">Section&nbsp;3.4.4, &ldquo;<code class="literal">org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier</code>&rdquo;</a>
                 for more details.</li><li><code class="literal">CaseInsensitiveDifferenceListener</code>
                a - <code class="literal">DifferenceListener</code> that ignores
                case when comparing texts.</li><li><code class="literal">FloatingPointTolerantDifferenceListener</code>
                a - <code class="literal">DifferenceListener</code> that tries
                to parse texts as floating point numbers and compares
                them using a configurable tolerance.</li></ul></div></li></ul></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="Bugfixes 1.2"></a>A.2.3.&nbsp;Important Bug Fixes</h4></div></div><div></div></div><div class="itemizedlist"><ul type="disc"><li>
            If XMLUnit couldn't match nodes (i.e. it encountered
            a <code class="literal">CHILD_NODE_NOT_FOUND</code> kind of
            difference), the XPath expressions of the node details
            have been random.  <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1860681&group_id=23187&atid=377768" target="_top">Issue 1860681</a>.
          </li></ul></div></div></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="apa.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="apa.html">Up</a></td><td align="right" width="40%">&nbsp;</td></tr><tr><td valign="top" align="left" width="40%">A.&nbsp;Changes&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;</td></tr></table></div></body></html>